<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
   <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
</head>
<body>
    <p id="test">hello world</p>
    <script>
    $(function(){
        var test=document.getElementById("test");
        var url="https://easy-mock.com/mock/5bac721cb328c27d98eb13f4/01/12"
        $.ajax({
            url,
            type:"get",
            dataType:"json",
            success(res){
                var name=res.data.name;
                test.innerHTML=name;
            },
            error(error){
                document.write(error.status)
            }
        })
    })
    </script>
</body>
</html>